{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "378264fe-1258-44ea-af32-f2d21fa1cc42",
   "metadata": {},
   "source": [
    "# 第二次作业\n",
    "\n",
    "1.\t改变盘符 C:, D:, E:, F:…., \n",
    "D:<回车>\n",
    "    (base)D:\\>\n",
    "2.\tC:\n",
    "3.\tcd<回车> - 检查当前的目录 \n",
    "4.\tcd<sp>文件夹的名字\n",
    "   change directory\n",
    "d:\n",
    "cd \\work\n",
    "5.\tmake directory\n",
    "md<sp>wangfeng\n",
    "D:\\> md d:\\work\\wangfeng\\1\n",
    "\n",
    "cd d:\\work\\wangfeng\\1\n",
    "\n",
    "6.\tremove directory\n",
    "rd<sp>wangfeng\n",
    "7.\techo<sp>“I love you” > 1.txt\n",
    "8.\tdir – 列出所有的文件\n",
    "* 表示所有的组合\n",
    "d\n",
    "9. type<sp>文件名.扩展名\n",
    "10.\tcopy<sp> <源文件名> <目标文件名>\n",
    "copy 1.txt 2.txt\n",
    "\t\n",
    "绝对路径\n",
    "copy d:\\work\\4.dat d:\\work\\wangfeng\\1\\5.dat\n",
    "\n",
    "相对相径\n",
    "copy 4.dat .\\wangfeng\\1\\5.dat\n",
    "\n",
    " 11 del  (DELETE)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "85438f05-a5ba-4a3f-b840-c38d93f56e06",
   "metadata": {},
   "source": [
    "# 常用的git操作\n",
    "git status\n",
    "\n",
    "git add <文件名>\n",
    "\n",
    "git commit -m \"xxxxxx\"\n",
    "\n",
    "git push"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a8929f60-88ce-439e-88c6-a4d3f8e2e801",
   "metadata": {},
   "source": [
    "\n",
    "# Python 变量名规则\n",
    "只能以字母或下划线开头，不能以数字或其他符号开头，不能包含空格或特殊符号。\n",
    "# Python 常用变量类型\n",
    "整数（int）\n",
    "浮点数（float）\n",
    "字符串（str）\n",
    "布尔值（bool）\n",
    "列表（list）\n",
    "字典（dict）\n",
    "# Python 常用运算符\n",
    "+：加法\n",
    "-：减法\n",
    "*：乘法\n",
    "/：除法\n",
    "//：整除\n",
    "%：取余数\n",
    "**：幂运算\n",
    "=：赋值\n",
    "+=：加法赋值\n",
    "==：等于\n",
    "!=：不等于"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "63d67445-1896-4e08-9ab3-7c9b06c33c1f",
   "metadata": {},
   "source": [
    "# 摄氏度和华氏度的转换"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "50b3bba0-81f1-48d7-a0b6-8788de9893ed",
   "metadata": {},
   "outputs": [
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      "请输入温度数值： 20\n",
      "请输入温度单位:(C/F) a\n",
      "请输入正确的温度单位:(C/F) C\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "20摄氏度=68.0华氏度\n"
     ]
    }
   ],
   "source": [
    "a=eval(input(\"请输入温度数值：\"))\n",
    "b=input(\"请输入温度单位:(C/F)\")\n",
    "for i in range(99):\n",
    "    if b==('C'):\n",
    "        f=a*9/5+32\n",
    "        print(f\"{a}摄氏度={f}华氏度\")\n",
    "        break\n",
    "    elif b==('F'):\n",
    "        c=(a-32)*5/9\n",
    "        print(f\"{a}华氏度={c}摄氏度\")\n",
    "        break\n",
    "    else:\n",
    "        b=input(\"请输入正确的温度单位:(C/F)\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c0849ccd-f7ce-4f05-afe0-b8fd81b76a94",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8d924a59-2dee-4b51-9713-5c0de4e7a64d",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
